# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Josip Ponjavic <josipponjavic at gmail dot com>
# Contributor: Xu Fasheng <fasheng.xu[AT]gmail.com>

pkgname=deepin-calendar
pkgver=5.9.1
pkgrel=1
pkgdesc='Calendar for Deepin Desktop Environment'
arch=('loong64' 'x86_64')
url="https://github.com/linuxdeepin/dde-calendar"
license=('GPL3')
depends=('deepin-qt5integration' 'hicolor-icon-theme')
makedepends=('cmake' 'gmock' 'gtest' 'ninja' 'qt5-tools')
groups=('deepin')
source=("https://github.com/linuxdeepin/dde-calendar/archive/$pkgver/$pkgname-$pkgver.tar.gz"
        "dde-calendar-icon.patch")
sha512sums=('d74d759246e3b178f18e932b36c0648269556d5f19132fd43813d1119dea8513a3a0964c474179cd909de9f13f8dd2fbe83907927b04051f03ebf0dc666b0148'
            '40ffae29fcbd386512dac9b91c39219b420b349f1f5facc254467b9e5407091886c8d0ed0979d566ba79539c093464cbc7719da7268c9745bc30273f9d7db7e2')

prepare() {
  cd dde-calendar-$pkgver

  # Install the application icon
  # https://github.com/linuxdeepin/dde-calendar/pull/31
  # patch -Np1 -i ../dde-calendar-icon.patch
}

build() {
  cd dde-calendar-$pkgver
  cmake -GNinja -DCMAKE_INSTALL_PREFIX=/usr .
  ninja
}

package() {
  cd dde-calendar-$pkgver
  DESTDIR="$pkgdir" ninja install
}
